Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

182
Views
El interruptor funciona al hacer doble clic | TDR

Estoy usando un interruptor (algo así como un botón de alternar) para mostrar algunos datos a los usuarios. Pero el interruptor solo funciona con doble clic en lugar de solo.

A continuación se muestra el código del archivo .js:

 var integrations = { init: function() { $("input[type='checkbox'].integration").bootstrapSwitch(); $("input[type='checkbox'].integration").on('switchChange.bootstrapSwitch', function(e, state) { $(this).siblings('.bootstrap-switch-label').click(); var val = $("input[type='checkbox'].integration").val() if (val === 'true') $(this).prop( "checked", true); else $(this).prop( "checked", false); }); this.jiraService = w.service.get('jira').init(); this.jiraService.initEvents(); if (w.Clipboard) { new w.Clipboard(".copy.tooltip-right"); } } };

¿Alguien sabe cómo hacer que funcione para un solo clic? ¡Por favor ayuda!

about 4 years ago · Santiago Trujillo
1 answers
Answer question

0

¿Puede verificar comentando debajo de la línea? Es posible que la etiqueta también esté haciendo clic en el interruptor.

 $(this).siblings('.bootstrap-switch-label').click();
about 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!